home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 80 / CD Actual 80 Julio-Agosto 2003.iso / Linux / LinuxGazette / lg / issue17 / source / cyldisp.rib < prev    next >
Encoding:
Text File  |  2002-08-14  |  2.1 KB  |  81 lines

  1. #########################################
  2. # Test RIB for checking shaders
  3. # By Michael J. Hammel March 1997
  4. #########################################
  5.  
  6. # First we setup the output file 
  7. Display "cyldisp.tif" "file" "rgb"
  8.  
  9. # Then set the x & y resolution of the image and the pixel aspect
  10. # ratio (1 = square pixels)
  11. Format 320 240 1
  12.  
  13. # We now setup the camera (projection type and field of view)
  14. Projection "perspective" "fov" 55
  15.  
  16. # Move the world 16 units away from the camera and position it
  17. # so the view is to the left of the camera and down from the cameras
  18. # point of view.
  19. Translate 0 0 16 
  20.  
  21. #
  22. # Off-white ambient light, not very intense, to make sure everything 
  23. # gets lit just a little.
  24. #
  25. LightSource "ambientlight" 1 
  26.          "intensity" 0.03 "lightcolor" [0.7 0.7 0.7]
  27.  
  28. TransformBegin
  29.  
  30. # Our first (and only) frame....
  31. FrameBegin 1
  32.  
  33. WorldBegin
  34.  
  35.    #
  36.    # Distant lights directly in front of and just off to both sides of
  37.    # our cylinder.
  38.    #
  39.    TransformBegin
  40.       Rotate -25 0 1 0
  41.       LightSource "distantlight" 3 
  42.          "intensity" 0.825 "lightcolor" [1 1 1]
  43.    TransformEnd
  44.    TransformBegin
  45.       Rotate 25 0 1 0
  46.       LightSource "distantlight" 3 
  47.          "intensity" 0.625 "lightcolor" [1 1 1]
  48.    TransformEnd
  49.    TransformBegin
  50.       LightSource "distantlight" 3 
  51.          "intensity" 0.425 "lightcolor" [1 1 1]
  52.    TransformEnd
  53.  
  54.    # The cylinder and its attributes
  55.    TransformBegin
  56.       Translate -.6 -.5 0
  57.       Scale 2.5 2.5 1
  58.       AttributeBegin
  59.          Color [ 0.72 0.45 0.20 ]          # copper color
  60.          Attribute "render" "truedisplacement" 1
  61.          Attribute "displacementbound" "coordinatesystem" "object" "sphere" 2
  62.          Declare "Ka" "float"
  63.          Surface "plastic"
  64.             "Ka" .5
  65.          Declare "frequency" "float"
  66.          Declare "phase" "float"
  67.          Declare "offset" "float"
  68.          Declare "Km" "float"
  69.          Declare "dampzone" "float"
  70.          Displacement "RCThreads"
  71.          TransformBegin
  72.             Scale 2 2.5 2
  73.             Rotate -90 1 0 0
  74.             Cylinder 1 -1 1 360
  75.          TransformEnd
  76.    AttributeEnd
  77.    TransformEnd
  78. WorldEnd
  79.  
  80. FrameEnd
  81.